package com.socket.nio.client;

import java.io.IOException;

/**
 * @auther zhangwj
 * @date 2020/6/14 11:52 上午
 */
public class DemoClient {
    public static void main(String[] args) {
        MySocketClient mySocketClient = new MySocketClient("127.0.0.1", 8080);
        try {
            int i = 0;
            while (true) {
                i++;
                String str = String.valueOf(i);
                Thread.sleep(5000);
                mySocketClient.clientSocket(str.getBytes());
            }
        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
    }
}
